package com.itlong.cloud.sdk.resource;


import com.itlong.cloud.POJO.VO.sdk.old.SDKAppOldElevatorInfoVO;
import com.itlong.cloud.equip.sdk.ISDKAppOldEquipServiceClient;
import com.itlong.cloud.sdk.service.ISDKAppOldElevatorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* <desc>
*    旧版APP_SDK设备服务暴露接口实现类。.
* </desc>
*
* @createDate 2017-11-16
*/
@RestController
public class SDKAppOldEquipResource implements ISDKAppOldEquipServiceClient {

    @Autowired
    ISDKAppOldElevatorInfoService isdkAppOldElevatorInfoService;//旧版APP_SDK电梯设备服务接口.
    /**
     * <desc>
     * 根据地址获取电梯设备唯一码列表.
     * </desc>
     *
     * @param projectId 项目编号
     * @param buildNum  楼栋编号
     * @param unitNums  单元编号列表(逗号分隔)
     * @return 设备唯一码列表
     * @author LewisLouis
     * @createDate 2017-11-16
     */
    @Override
    @RequestMapping(path = "/sdk/appEquip/getDeviceUniquesByAddress",method = RequestMethod.POST)
    public List<SDKAppOldElevatorInfoVO> getDeviceUniquesByAddress(@RequestParam("projectId")String projectId,
                                                                   @RequestParam("buildNum")String buildNum,
                                                                   @RequestParam("unitNums")String unitNums) {
        return isdkAppOldElevatorInfoService.getDeviceUniquesByAddress(projectId,buildNum,unitNums);
    }
}
